<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>fdk-aac: original/libSBRenc/src/env_est.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">fdk-aac
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_ed137715e08969a186ec660e8ae6e2fb.html">original</a></li><li class="navelem"><a class="el" href="dir_ed04b364c633b7d989cbbfdbe7d82d9c.html">libSBRenc</a></li><li class="navelem"><a class="el" href="dir_503efe22260b46e9073f09b8bee50978.html">src</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">env_est.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Envelope estimation structs and prototypes.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &quot;<a class="el" href="sbr__def_8h_source.html">sbr_def.h</a>&quot;</code><br />
<code>#include &quot;sbr_encoder.h&quot;</code><br />
<code>#include &quot;ps_main.h&quot;</code><br />
<code>#include &quot;<a class="el" href="bit__sbr_8h_source.html">bit_sbr.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="fram__gen_8h_source.html">fram_gen.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="tran__det_8h_source.html">tran_det.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="code__env_8h_source.html">code_env.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="ton__corr_8h_source.html">ton_corr.h</a>&quot;</code><br />
</div>
<p><a href="env__est_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_s_b_r___e_x_t_r_a_c_t___e_n_v_e_l_o_p_e.html">SBR_EXTRACT_ENVELOPE</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_e_n_v___c_h_a_n_n_e_l.html">ENV_CHANNEL</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_s_b_r___f_r_a_m_e___t_e_m_p___d_a_t_a.html">SBR_FRAME_TEMP_DATA</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_s_b_r___e_n_v___t_e_m_p___d_a_t_a.html">SBR_ENV_TEMP_DATA</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:ab036e381e458c401b00c870b895a3724"><td class="memItemLeft" align="right" valign="top"><a id="ab036e381e458c401b00c870b895a3724"></a>
typedef <a class="el" href="struct_s_b_r___e_x_t_r_a_c_t___e_n_v_e_l_o_p_e.html">SBR_EXTRACT_ENVELOPE</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>HANDLE_SBR_EXTRACT_ENVELOPE</b></td></tr>
<tr class="separator:ab036e381e458c401b00c870b895a3724"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a669c5b3c123b23291690da41a77bafbc"><td class="memItemLeft" align="right" valign="top"><a id="a669c5b3c123b23291690da41a77bafbc"></a>
typedef struct <a class="el" href="struct_e_n_v___c_h_a_n_n_e_l.html">ENV_CHANNEL</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>HANDLE_ENV_CHANNEL</b></td></tr>
<tr class="separator:a669c5b3c123b23291690da41a77bafbc"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a32d5af26c4e31d3790ae2fbaeb392557"><td class="memItemLeft" align="right" valign="top"><a class="el" href="machine__type_8h.html#a4cf9af43a95c45c3d469658098dfbe1a">INT</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="env__est_8h.html#a32d5af26c4e31d3790ae2fbaeb392557">FDKsbrEnc_CreateExtractSbrEnvelope</a> (<a class="el" href="struct_s_b_r___e_x_t_r_a_c_t___e_n_v_e_l_o_p_e.html">HANDLE_SBR_EXTRACT_ENVELOPE</a> hSbrCut, <a class="el" href="machine__type_8h.html#a4cf9af43a95c45c3d469658098dfbe1a">INT</a> channel, <a class="el" href="machine__type_8h.html#a4cf9af43a95c45c3d469658098dfbe1a">INT</a> chInEl, <a class="el" href="machine__type_8h.html#aed5a2dbe32af3a91203f0f5e8697e873">UCHAR</a> *dynamic_RAM)</td></tr>
<tr class="memdesc:a32d5af26c4e31d3790ae2fbaeb392557"><td class="mdescLeft">&#160;</td><td class="mdescRight">creates an envelope extractor handle  <a href="env__est_8h.html#a32d5af26c4e31d3790ae2fbaeb392557">More...</a><br /></td></tr>
<tr class="separator:a32d5af26c4e31d3790ae2fbaeb392557"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5239ad5afdf2905f8be5b50d87b84c3d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="machine__type_8h.html#a4cf9af43a95c45c3d469658098dfbe1a">INT</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="env__est_8h.html#a5239ad5afdf2905f8be5b50d87b84c3d">FDKsbrEnc_InitExtractSbrEnvelope</a> (<a class="el" href="struct_s_b_r___e_x_t_r_a_c_t___e_n_v_e_l_o_p_e.html">HANDLE_SBR_EXTRACT_ENVELOPE</a> hSbr, int no_cols, int no_rows, int start_index, int time_slots, int time_step, int tran_off, <a class="el" href="machine__type_8h.html#a6b1d94bcd9123a6d01d2d28b8ec5e25e">ULONG</a> statesInitFlag, int chInEl, <a class="el" href="machine__type_8h.html#aed5a2dbe32af3a91203f0f5e8697e873">UCHAR</a> *dynamic_RAM, <a class="el" href="machine__type_8h.html#afff0ab3629a68bc1bb3b2a2f4296173f">UINT</a> sbrSyntaxFlags)</td></tr>
<tr class="memdesc:a5239ad5afdf2905f8be5b50d87b84c3d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize an envelope extractor instance.  <a href="env__est_8h.html#a5239ad5afdf2905f8be5b50d87b84c3d">More...</a><br /></td></tr>
<tr class="separator:a5239ad5afdf2905f8be5b50d87b84c3d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac444ee30ace3f5d1f3eb496bba3ed49d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="env__est_8h.html#ac444ee30ace3f5d1f3eb496bba3ed49d">FDKsbrEnc_deleteExtractSbrEnvelope</a> (<a class="el" href="struct_s_b_r___e_x_t_r_a_c_t___e_n_v_e_l_o_p_e.html">HANDLE_SBR_EXTRACT_ENVELOPE</a> hSbrCut)</td></tr>
<tr class="memdesc:ac444ee30ace3f5d1f3eb496bba3ed49d"><td class="mdescLeft">&#160;</td><td class="mdescRight">deinitializes an envelope extractor handle  <a href="env__est_8h.html#ac444ee30ace3f5d1f3eb496bba3ed49d">More...</a><br /></td></tr>
<tr class="separator:ac444ee30ace3f5d1f3eb496bba3ed49d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af93199dfb359716187571f8e291d7d31"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="env__est_8h.html#af93199dfb359716187571f8e291d7d31">FDKsbrEnc_extractSbrEnvelope1</a> (<a class="el" href="struct_s_b_r___c_o_n_f_i_g___d_a_t_a.html">HANDLE_SBR_CONFIG_DATA</a> h_con, <a class="el" href="struct_s_b_r___h_e_a_d_e_r___d_a_t_a.html">HANDLE_SBR_HEADER_DATA</a> sbrHeaderData, <a class="el" href="struct_s_b_r___b_i_t_s_t_r_e_a_m___d_a_t_a.html">HANDLE_SBR_BITSTREAM_DATA</a> sbrBitstreamData, <a class="el" href="struct_e_n_v___c_h_a_n_n_e_l.html">HANDLE_ENV_CHANNEL</a> h_envChan, <a class="el" href="struct_c_o_m_m_o_n___d_a_t_a.html">HANDLE_COMMON_DATA</a> cmonData, <a class="el" href="struct_s_b_r___e_n_v___t_e_m_p___d_a_t_a.html">SBR_ENV_TEMP_DATA</a> *eData, <a class="el" href="struct_s_b_r___f_r_a_m_e___t_e_m_p___d_a_t_a.html">SBR_FRAME_TEMP_DATA</a> *fData)</td></tr>
<tr class="memdesc:af93199dfb359716187571f8e291d7d31"><td class="mdescLeft">&#160;</td><td class="mdescRight">calculates the noise floor and the envelope values from the energies, depending on framing and stereo mode  <a href="env__est_8h.html#af93199dfb359716187571f8e291d7d31">More...</a><br /></td></tr>
<tr class="separator:af93199dfb359716187571f8e291d7d31"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3867e1ddfa54300878dd6931cdbe7b56"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="env__est_8h.html#a3867e1ddfa54300878dd6931cdbe7b56">FDKsbrEnc_extractSbrEnvelope2</a> (<a class="el" href="struct_s_b_r___c_o_n_f_i_g___d_a_t_a.html">HANDLE_SBR_CONFIG_DATA</a> h_con, <a class="el" href="struct_s_b_r___h_e_a_d_e_r___d_a_t_a.html">HANDLE_SBR_HEADER_DATA</a> sbrHeaderData, <a class="el" href="struct_t___p_a_r_a_m_e_t_r_i_c___s_t_e_r_e_o.html">HANDLE_PARAMETRIC_STEREO</a> hParametricStereo, <a class="el" href="struct_s_b_r___b_i_t_s_t_r_e_a_m___d_a_t_a.html">HANDLE_SBR_BITSTREAM_DATA</a> sbrBitstreamData, <a class="el" href="struct_e_n_v___c_h_a_n_n_e_l.html">HANDLE_ENV_CHANNEL</a> sbrEnvChannel0, <a class="el" href="struct_e_n_v___c_h_a_n_n_e_l.html">HANDLE_ENV_CHANNEL</a> sbrEnvChannel1, <a class="el" href="struct_c_o_m_m_o_n___d_a_t_a.html">HANDLE_COMMON_DATA</a> cmonData, <a class="el" href="struct_s_b_r___e_n_v___t_e_m_p___d_a_t_a.html">SBR_ENV_TEMP_DATA</a> *eData, <a class="el" href="struct_s_b_r___f_r_a_m_e___t_e_m_p___d_a_t_a.html">SBR_FRAME_TEMP_DATA</a> *fData, int clearOutput)</td></tr>
<tr class="memdesc:a3867e1ddfa54300878dd6931cdbe7b56"><td class="mdescLeft">&#160;</td><td class="mdescRight">calculates the noise floor and the envelope values from the energies, depending on framing and stereo mode  <a href="env__est_8h.html#a3867e1ddfa54300878dd6931cdbe7b56">More...</a><br /></td></tr>
<tr class="separator:a3867e1ddfa54300878dd6931cdbe7b56"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a30794b82aa4c90455ea839b57cdbfe62"><td class="memItemLeft" align="right" valign="top"><a id="a30794b82aa4c90455ea839b57cdbfe62"></a>
<a class="el" href="machine__type_8h.html#a4cf9af43a95c45c3d469658098dfbe1a">INT</a>&#160;</td><td class="memItemRight" valign="bottom"><b>FDKsbrEnc_GetEnvEstDelay</b> (<a class="el" href="struct_s_b_r___e_x_t_r_a_c_t___e_n_v_e_l_o_p_e.html">HANDLE_SBR_EXTRACT_ENVELOPE</a> hSbr)</td></tr>
<tr class="separator:a30794b82aa4c90455ea839b57cdbfe62"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Envelope estimation structs and prototypes. </p>
<dl class="section rcs"><dt>Revision</dt><dd>92790 </dd></dl>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="a32d5af26c4e31d3790ae2fbaeb392557"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a32d5af26c4e31d3790ae2fbaeb392557">&#9670;&nbsp;</a></span>FDKsbrEnc_CreateExtractSbrEnvelope()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="machine__type_8h.html#a4cf9af43a95c45c3d469658098dfbe1a">INT</a> FDKsbrEnc_CreateExtractSbrEnvelope </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_s_b_r___e_x_t_r_a_c_t___e_n_v_e_l_o_p_e.html">HANDLE_SBR_EXTRACT_ENVELOPE</a>&#160;</td>
          <td class="paramname"><em>hSbrCut</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="machine__type_8h.html#a4cf9af43a95c45c3d469658098dfbe1a">INT</a>&#160;</td>
          <td class="paramname"><em>channel</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="machine__type_8h.html#a4cf9af43a95c45c3d469658098dfbe1a">INT</a>&#160;</td>
          <td class="paramname"><em>chInEl</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="machine__type_8h.html#aed5a2dbe32af3a91203f0f5e8697e873">UCHAR</a> *&#160;</td>
          <td class="paramname"><em>dynamic_RAM</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>creates an envelope extractor handle </p>
<dl class="section return"><dt>Returns</dt><dd>error status </dd></dl>

</div>
</div>
<a id="ac444ee30ace3f5d1f3eb496bba3ed49d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac444ee30ace3f5d1f3eb496bba3ed49d">&#9670;&nbsp;</a></span>FDKsbrEnc_deleteExtractSbrEnvelope()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void FDKsbrEnc_deleteExtractSbrEnvelope </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_s_b_r___e_x_t_r_a_c_t___e_n_v_e_l_o_p_e.html">HANDLE_SBR_EXTRACT_ENVELOPE</a>&#160;</td>
          <td class="paramname"><em>hSbrCut</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>deinitializes an envelope extractor handle </p>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>

</div>
</div>
<a id="af93199dfb359716187571f8e291d7d31"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af93199dfb359716187571f8e291d7d31">&#9670;&nbsp;</a></span>FDKsbrEnc_extractSbrEnvelope1()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void FDKsbrEnc_extractSbrEnvelope1 </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_s_b_r___c_o_n_f_i_g___d_a_t_a.html">HANDLE_SBR_CONFIG_DATA</a>&#160;</td>
          <td class="paramname"><em>h_con</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_s_b_r___h_e_a_d_e_r___d_a_t_a.html">HANDLE_SBR_HEADER_DATA</a>&#160;</td>
          <td class="paramname"><em>sbrHeaderData</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_s_b_r___b_i_t_s_t_r_e_a_m___d_a_t_a.html">HANDLE_SBR_BITSTREAM_DATA</a>&#160;</td>
          <td class="paramname"><em>sbrBitstreamData</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_e_n_v___c_h_a_n_n_e_l.html">HANDLE_ENV_CHANNEL</a>&#160;</td>
          <td class="paramname"><em>hEnvChan</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_c_o_m_m_o_n___d_a_t_a.html">HANDLE_COMMON_DATA</a>&#160;</td>
          <td class="paramname"><em>hCmonData</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_s_b_r___e_n_v___t_e_m_p___d_a_t_a.html">SBR_ENV_TEMP_DATA</a> *&#160;</td>
          <td class="paramname"><em>eData</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_s_b_r___f_r_a_m_e___t_e_m_p___d_a_t_a.html">SBR_FRAME_TEMP_DATA</a> *&#160;</td>
          <td class="paramname"><em>fData</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>calculates the noise floor and the envelope values from the energies, depending on framing and stereo mode </p>
<p>FDKsbrEnc_extractSbrEnvelope is the main function for encoding and writing the envelope and the noise floor. The function includes the following processes:</p>
<p>-Analysis subband filtering. -Encoding SA and pan parameters (if enabled). -Transient detection. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sbrHeaderData</td><td>handle to config data </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a3867e1ddfa54300878dd6931cdbe7b56"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3867e1ddfa54300878dd6931cdbe7b56">&#9670;&nbsp;</a></span>FDKsbrEnc_extractSbrEnvelope2()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void FDKsbrEnc_extractSbrEnvelope2 </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_s_b_r___c_o_n_f_i_g___d_a_t_a.html">HANDLE_SBR_CONFIG_DATA</a>&#160;</td>
          <td class="paramname"><em>h_con</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_s_b_r___h_e_a_d_e_r___d_a_t_a.html">HANDLE_SBR_HEADER_DATA</a>&#160;</td>
          <td class="paramname"><em>sbrHeaderData</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_t___p_a_r_a_m_e_t_r_i_c___s_t_e_r_e_o.html">HANDLE_PARAMETRIC_STEREO</a>&#160;</td>
          <td class="paramname"><em>hParametricStereo</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_s_b_r___b_i_t_s_t_r_e_a_m___d_a_t_a.html">HANDLE_SBR_BITSTREAM_DATA</a>&#160;</td>
          <td class="paramname"><em>sbrBitstreamData</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_e_n_v___c_h_a_n_n_e_l.html">HANDLE_ENV_CHANNEL</a>&#160;</td>
          <td class="paramname"><em>h_envChan0</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_e_n_v___c_h_a_n_n_e_l.html">HANDLE_ENV_CHANNEL</a>&#160;</td>
          <td class="paramname"><em>h_envChan1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_c_o_m_m_o_n___d_a_t_a.html">HANDLE_COMMON_DATA</a>&#160;</td>
          <td class="paramname"><em>hCmonData</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_s_b_r___e_n_v___t_e_m_p___d_a_t_a.html">SBR_ENV_TEMP_DATA</a> *&#160;</td>
          <td class="paramname"><em>eData</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_s_b_r___f_r_a_m_e___t_e_m_p___d_a_t_a.html">SBR_FRAME_TEMP_DATA</a> *&#160;</td>
          <td class="paramname"><em>fData</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>clearOutput</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>calculates the noise floor and the envelope values from the energies, depending on framing and stereo mode </p>
<p>FDKsbrEnc_extractSbrEnvelope is the main function for encoding and writing the envelope and the noise floor. The function includes the following processes:</p>
<p>-Determine time/frequency division of current granule. -Sending transient info to bitstream. -Set amp_res to 1.5 dB if the current frame contains only one envelope. -Lock dynamic bandwidth frequency change if the next envelope not starts on a frame boundary. -MDCT transposer (needed to detect where harmonics will be missing). -Spectrum Estimation (used for pulse train and missing harmonics detection). -Pulse train detection. -Inverse Filtering detection. -Waveform Coding. -Missing Harmonics detection. -Extract envelope of current frame. -Noise floor estimation. -Noise floor quantisation and coding. -Encode envelope of current frame. -Send the encoded data to the bitstream. -Write to bitstream. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sbrHeaderData</td><td>handle to config data </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a5239ad5afdf2905f8be5b50d87b84c3d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5239ad5afdf2905f8be5b50d87b84c3d">&#9670;&nbsp;</a></span>FDKsbrEnc_InitExtractSbrEnvelope()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="machine__type_8h.html#a4cf9af43a95c45c3d469658098dfbe1a">INT</a> FDKsbrEnc_InitExtractSbrEnvelope </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_s_b_r___e_x_t_r_a_c_t___e_n_v_e_l_o_p_e.html">HANDLE_SBR_EXTRACT_ENVELOPE</a>&#160;</td>
          <td class="paramname"><em>hSbrCut</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>no_cols</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>no_rows</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>start_index</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>time_slots</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>time_step</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>tran_off</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="machine__type_8h.html#a6b1d94bcd9123a6d01d2d28b8ec5e25e">ULONG</a>&#160;</td>
          <td class="paramname"><em>statesInitFlag</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>chInEl</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="machine__type_8h.html#aed5a2dbe32af3a91203f0f5e8697e873">UCHAR</a> *&#160;</td>
          <td class="paramname"><em>dynamic_RAM</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="machine__type_8h.html#afff0ab3629a68bc1bb3b2a2f4296173f">UINT</a>&#160;</td>
          <td class="paramname"><em>sbrSyntaxFlags</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize an envelope extractor instance. </p>
<dl class="section return"><dt>Returns</dt><dd>error status </dd></dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
</small></address>
</body>
</html>
